﻿using ARchGL.Platform.Mpp.InputModels;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using WebApiClient;
using WebApiClient.Attributes;

namespace ARchGL.Platform.Mpp
{
    [TraceFilter(OutputTarget = OutputTarget.Console)]
    public interface IMppProjectApi : IHttpApi
    {
        /// <summary>
        ///  创建项目进度
        /// </summary>
        /// <param name="projectId">项目标识</param>
        /// <param name="input">创建进度参数</param>
        /// <returns></returns>
        [Timeout(10000)]
        [HttpPost("/mpp/api/v1.0/mpp/project/{projectId}")]
        [JsonReturn]
        ITask<AjaxResponseMpp<CreateMppDto>> CreateMppProject(Guid projectId, [JsonContent] CreateMppProjectInput input);

        /// <summary>
        ///  修改项目进度
        /// </summary>
        /// <param name="projectId">项目标识</param>
        /// <param name="input">创建进度参数</param>
        /// <returns></returns>
        [Timeout(10000)]
        [HttpPut("/mpp/api/v1.0/mpp/project/{projectId}")]
        [JsonReturn]
        ITask<AjaxResponseMpp<dynamic>> ModifyMppProject(Guid projectId, [JsonContent] ModifyMppProjectInput input);

        /// <summary>
        /// 删除进度项
        /// </summary>
        /// <param name="projectId"></param>
        /// <returns></returns>
        [Timeout(10000)]
        [HttpDelete("/mpp/api/v1.0/mpp/project/{projectId}")]
        [JsonReturn]
        ITask<AjaxResponseMpp<dynamic>> RemoveMppPorject(Guid projectId);

        /// <summary>
        /// 新增/修改/删除项目进度任务
        /// </summary>
        /// <param name="projectId"></param>
        /// <returns></returns>
        [Timeout(10000)]
        [HttpPut("/mpp/api/v1.0/mpp/project/{projectId}/batch")]
        [JsonReturn]
        ITask<AjaxResponseMpp<dynamic>> PutMppPorjectTask(Guid projectId, [JsonContent] dynamic input);
    }
}
